<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all">
		<link rel="stylesheet" href="../../../../css/common.css" media="all">
	</head>
	<body>

		<div class="layui-fluid">
			<div class="layui-row" id="view"></div>
		</div>

		<script type="text/html" id="demo">
			<div class="layui-card">
				<div class="layui-card-body">
					<div class="layui-row details">
						<div class="layui-col-xs12">
							订单编号：<span> {{ d.data.orderid ? d.data.orderid : '--' }}<span> 
						</div>
						<div class="layui-col-xs12">
							会员编号：<span> {{ d.data.memberid ? d.data.memberid : '--' }}<span> 
						</div>
						<div class="layui-col-xs12">
							订单状态： <span> {{ d.data.status ? '<span class="text_red_color">' + order_status_show(1,d.data.status) + '</span>' : '--' }}<span> 
						</div>
						<div class="layui-col-xs12">
							订单类型：<span> {{ d.data.type ? '<span class="text_red_color">' + order_type(d.data.type) + '</span>' : '--' }}<span> 
						</div>
						
						
						<div class="layui-col-xs12">
							购买数量： <span> {{ d.data.quantity ? d.data.quantity : '--' }}<span> 
						</div>
						<div class="layui-col-xs12">
							订单金额： <span> {{ d.data.pay_price ? d.data.pay_price : '--' }}<span> 
						</div>
						<div class="layui-col-xs12">
							支付方式： <span> {{ d.data.payment ? payment_show(1,d.data.payment) : '--' }}<span> 
						</div>
						<div class="layui-col-xs12">
							健康豆抵扣：<span>  {{ d.data.amount_points ? d.data.amount_points : '--' }}<span> 
						</div>
						<div class="layui-col-xs12">
							健康豆赠送： <span> {{ d.data.points_give ? points_give : '--' }}<span> 
						</div>
						
						<div class="layui-col-xs12">
							添加时间： <span> {{ d.data.addtime ? d.data.addtime : '--'}}<span> 
						</div>
					</div>
				</div>
			</div>
			<div class="layui-card">
				<div class="layui-card-body">
					<div class="layui-row details">
						<div class="layui-col-xs12">
							收货人姓名：<span>{{ d.data.consignee ? d.data.consignee : '--' }}<span> 
						</div>
						<div class="layui-col-xs12">
							收货人电话：<span>{{ d.data.mobile ? d.data.mobile : '--' }}<span> 
						</div>
						<div class="layui-col-xs12">
							收货地址：<span>{{ d.data.areaname ? d.data.areaname : '--' }}{{ d.data.address ? d.data.address : '--' }}<span> 
						</div>
					</div>
				</div>
			</div>
		</script>

		<script src="../../../../layuiadmin/layui/layui.js"></script>
		<script src="../../../../js/jquery.min.js"></script>
		<script src="../../../../js/jquery.jqprint-0.3.js"></script>
		<script src="../../../../js/common.js"></script>
		<script>
			var _data = {
				orderid: getParam('orderid')
			}
			// console.log(_data.id);

			layui.config({
				base: '../../../../layuiadmin/' //静态资源所在路径
			}).extend({
				index: 'lib/index' //主入口模块
			}).use(['index', 'form', 'laytpl'], function() {
				var $ = layui.$,
					admin = layui.admin,
					laytpl = layui.laytpl,
					form = layui.form;

				initdata();

				function initdata() {
					$.get(server.queryordersdetail, _data, function(res, status) {
						if (status == 'success') {
							if (res.code == 0) {
								var data = res.orders

								var getTpl = demo.innerHTML,
									view = document.getElementById('view');
								laytpl(getTpl).render(data, function(html) {
									view.innerHTML = html;
								});
							} else {
								layer.msg(res.msg);
							}
						} else {
							layer.msg('服务器连接错误');
						}
					});
				}
			});
		</script>
	</body>
</html>
